package com.awenhui.demo.config;

import java.util.Date;
import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import lombok.Data;

/**
 * 测试配置文件映射
 */
@Data
@Component //注入spring容器
@Validated //验证配置@NotNull等
//@ConfigurationProperties(prefix="person")
public class Person {
    private String name;
    private Integer age;
    private Date birth;
    private List<String> friends;
    private List<String> classmates;
    private Dog dog;


}
@Data
 class Dog{
    private String name;
    private Integer age;
}
